package zkclient;

import org.I0Itec.zkclient.ZkClient;

/**
 * Created by Administrator on 2017/3/12.
 */
public class ClientPublisher {

    public static void main(String[] args) throws Exception{
        ZkClient zkClient = new ZkClient("localhost:2181", 5000);


        zkClient.createPersistent("/zhang/li","2");
        zkClient.createPersistent("/zhang/wang","3");
        zkClient.writeData("/zhang/wang","4");
        zkClient.delete("/zhang/wang");

        Thread.sleep(5000);

        zkClient.close();
    }

}
